function outMat=Diagonalization(inputMat)

[rowNum,colNum]=size(inputMat);
flag=isDiagMat(inputMat);
if rowNum==1|colNum==1
    outMat=diag(inputMat);
elseif flag==1
    outMat=inputMat;
else
    error('this matrix can not be diagonalization');
end
    